/*
* Poppy Game Engine - https://pgetemplate.googlecode.com/svn/
* -----------------------------------------------------------------------
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
*
* Copyright (c) 2008 Poppy
*/

#pragma once

#include "ITimer.h"

namespace PGESystem
{
	class PGESYSTEM_API CFPSTimer : public ITimer, virtual public CMemObject
	{
	public:

		CFPSTimer( float updateCycle );

		virtual void SetDeltaTime( const float* time, TIME_UNIT unit, const PGE_TICK_RESOLUTION* tickresolu, const PGE_CURRENT_TICK* deltatick );

		virtual bool ProcessPerTime();

		const float* GetFps() const;

	protected:

		const float* m_pDeltaTime;

		float m_fTimeCount, m_fFps;

		int m_dFrameCount;

		const float m_fUpdateCycle;

		float m_fUpdateRate;

	};

	typedef CFPSTimer FPS_TIMER,*LPFPS_TIMER;

}
